package com.ronx.scs.service;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.jdbc.JdbcDaoImpl;

//@Service
public class JdbcServiceImpl extends JdbcDaoImpl implements ChangePasswordService {
    @Override
    public void changePassword(String username, String password) {
        getJdbcTemplate().update("UPDATE USERS SET PASSWORD = ?  WHERE USERNAME = ? ", password, username);
    }

    @Override
    @Autowired
//    @Qualifier("groupAuthoritiesByUsernameQueryString")
    public void setGroupAuthoritiesByUsernameQuery(String groupAuthoritiesByUsernameQueryString) {
        super.setGroupAuthoritiesByUsernameQuery(groupAuthoritiesByUsernameQueryString);
    }

    @Override
    @Autowired
//    @ByUsernameQueryString(who = "users")
//    @Qualifier("usersByUsernameQueryString")
    public void setUsersByUsernameQuery(String usersByUsernameQueryString) {
        super.setUsersByUsernameQuery(usersByUsernameQueryString);
    }
}
